home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CU Amiga Super CD-ROM 18
/
CU Amiga Magazine's Super CD-ROM 18 (1997)(EMAP Images)(GB)[!][issue 1998-01].iso
/
CUCD
/
Magazine
/
WiredWorld
/
THOR_2.5_upgrade
/
rexx
/
NCommPoll.thor
< prev
next >
Wrap
Text File
|
1997-09-15
|
2KB
|
77 lines
/* NCommPoll.thor by Troels Walsted Hansen
** $VER: NCommPoll.thor 2.0 (1.11.94)
**
** An ARexx script that automates NComm dialing of BBSs chosen
** from a multiselectable list.
**
** IMPORTANT: To use this script, the BBSs configured in THOR must
** have the same name as those in your NComm phonebook.
**
** New: This version is only for THOR v2.0 or higher.
*/
options results
/* needs THOR and bbsread.library functions */
p = ' ' || address() || ' ' || show('P',,)
thorport = pos(' THOR.',p)
if thorport > 0 then thorport = word(substr(p,thorport+1),1)
else
do
say 'No THOR port found!'
exit 10
end
if ~show('p', 'BBSREAD') then
do
address command
"run >nil: `GetEnv THOR/THORPath`bin/LoadBBSRead"
"WaitForPort BBSREAD"
end
/* request BBSs */
address(bbsread)
GETBBSLIST stem BBSLIST
if(rc ~= 0) then
do
address(thorport)
REQUESTNOTIFY TEXT '"'BBSREAD.LASTERROR'"' BT '"_Ok"'
exit 5
end
address(thorport)
THORTOFRONT
REQUESTLIST instem BBSLIST outstem USERBBSLIST title '"Select BBSs:"' DRAGSELECT MULTISELECT SIZEGADGET
if(rc ~= 0 | USERBBSLIST.COUNT == 0) then exit
dialstring = ""
do i=1 to USERBBSLIST.COUNT
dialstring = dialstring || "|" || USERBBSLIST.i
end
/* Is NComm already running? If not, start it... */
if ~show('p', 'ncomm') then do
if ~exists("t:NCommStartupScript") then do
call open(nscript, "t:NCommStartupScript", W)
call writeln(nscript, "stack 10000")
call writeln(nscript, "cd NComm:")
call writeln(nscript, "run <>nil: NComm")
call close(nscript)
end
address command
"execute >nil: t:NCommStartupScript"
"WaitForPort ncomm"
if(rc) then exit
end
address 'ncomm'
NCOMMTOFRONT
DIAL strip(dialstring, B, "|")
exit